﻿<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
 

</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<script runat="server">
  protected void btnOk_Click(object sender, EventArgs e)
        {
   srcAdd.InsertParameters["username"].DefaultValue = Page.User.Identity.Name;
      srcAdd.Insert();       

            if (Roles.RoleExists("customer"))
            {
                if (!Roles.IsUserInRole(CreateUserWizard1.UserName, "customer"))
                {
                    string i;
                    i = Page.User.Identity.Name;
                    //Roles.CreateRole("customer");
                    Roles.AddUserToRole(i, "customer");

                }
            }
        }     
</script>
 <script type="text/javascript">

     function displayCalendar() {
         var datePicker = document.getElementById('datePicker');
         datePicker.style.display = 'block';
     }
    
    </script>
 <script type="text/javascript">

     function displayCalendar() {
         var datePicker = document.getElementById('datePicker');
         datePicker.style.display = 'block';
     }
    
    </script>
<script type="text/javascript">


    function MM_preloadImages() { //v3.0
        var d = document; if (d.images) {
            if (!d.MM_p) d.MM_p = new Array();
            var i, j = d.MM_p.length, a = MM_preloadImages.arguments; for (i = 0; i < a.length; i++)
                if (a[i].indexOf("#") != 0) { d.MM_p[j] = new Image; d.MM_p[j++].src = a[i]; } 
        }
    }
    function MM_findObj(n, d) { //v4.01
        var p, i, x; if (!d) d = document; if ((p = n.indexOf("?")) > 0 && parent.frames.length) {
            d = parent.frames[n.substring(p + 1)].document; n = n.substring(0, p);
        }
        if (!(x = d[n]) && d.all) x = d.all[n]; for (i = 0; !x && i < d.forms.length; i++) x = d.forms[i][n];
        for (i = 0; !x && d.layers && i < d.layers.length; i++) x = MM_findObj(n, d.layers[i].document);
        if (!x && d.getElementById) x = d.getElementById(n); return x;
    }
    function MM_swapImage() { //v3.0
        var i, j = 0, x, a = MM_swapImage.arguments; document.MM_sr = new Array; for (i = 0; i < (a.length - 2); i += 3)
            if ((x = MM_findObj(a[i])) != null) { document.MM_sr[j++] = x; if (!x.oSrc) x.oSrc = x.src; x.src = a[i + 2]; }
    }
    function MM_swapImgRestore() { //v3.0
        var i, x, a = document.MM_sr; for (i = 0; a && i < a.length && (x = a[i]) && x.oSrc; i++) x.src = x.oSrc;
    }




</script>
 <style type="text/css">
        #datePicker
        {
            display:none;
            position:absolute;
            border:solid 2px black;
            background-color:white;
           
        }
    
    </style>
<style type="text/css">
html
{
  background-image:url('image/back.jpg'); 

    padding:10px;
    color:White;    
  
}
.content
{
    width:950px;
    margin:auto;
        height: 197px;
    }
a
{
 color: white;
 text-decoration:none;

}
a:hover
{
 color: red; 
  text-decoration:none;

}
.link
{
  margin-left:350px; 
     font-weight:bold;
  font-size:large;  
    font-size:x-large;
}
.link2
{
  margin-left:50px; 
     font-weight:bold;
  font-size:large;  
    font-size:x-large;
}
.link3
{
  margin-left:100px; 
     font-weight:bold;

}
.join
{
   background-color:#0099FF;
  clip:auto;
  font-weight:bold;
  font-size:large;
}
.table2
{
 border-style:solid;
   border-color:Black;
   background-color:White;
   color:Black;  
   width:900px; 
}
.row
{
   background-color:Gray;
   color:White;
}
.ticket
{
   background-color:#CC0000;
color:White;

}

.ticket:hover
{
 color: black; 
  text-decoration:none;


}
    .style1
    {
        width: 509px;
    }
    
.footer
{

     font-weight:bold;
  font-size:large;  

}
.border
{
   border:solid 4px White;
    
}
</style>
    <title>Register</title>
</head>
<body>
    <form id="form1" runat="server">
    <div class="content">
 <asp:Image ID="Image1" Width="1000" Height="130" ImageUrl="~/image/tdk-jun5-bannerbatmanexclusivo2.jpg" runat="server" />

<asp:HyperLink ID="HyperLink1"  CssClass="link" NavigateUrl="~/Default.aspx" runat="server">Home</asp:HyperLink>
<asp:HyperLink ID="HyperLink2"  CssClass="link2" NavigateUrl="~/Session.aspx" runat="server">Session</asp:HyperLink> <asp:HyperLink ID="HyperLink3" CssClass="link2" NavigateUrl="~/Movie.aspx" runat="server">Movies</asp:HyperLink>
<asp:HyperLink ID="HyperLink6" CssClass="link2"  NavigateUrl="~/Price.aspx" runat="server">Prices</asp:HyperLink>
<asp:HyperLink ID="HyperLink17" CssClass="link2"  NavigateUrl="~/register.aspx" runat="server">Register</asp:HyperLink>
 <br /> <br />
      
  
 <table >
 <tr><td><asp:Label ID="Label6" runat="server"  ForeColor="Yellow" Text="Buy Tickets For:" Font-Bold="True"></asp:Label>   </td> <td>  <asp:Menu
        id="menuTabs"
      StaticMenuItemStyle-BackColor="#333333" 
        StaticMenuItemStyle-Font-Size="Larger"
       DynamicHorizontalOffset="0"   
      DynamicHoverStyle-BackColor="#666666"
        DynamicMenuItemStyle-Width="150px"
       DynamicMenuItemStyle-BackColor="#333333" runat="server">
       <Items>
       <asp:MenuItem
       Text="Theatre" Selectable="False"  >
     <asp:MenuItem
       Text="Southwestcinema4"
   
        NavigateUrl="~/MovieCinema1.aspx" />
    <asp:MenuItem
      Text="RuralTwinCinemas"
     NavigateUrl="~/MovieCinema2.aspx" />
   </asp:MenuItem>
       </Items>
       </asp:Menu></td><td>&nbsp;&nbsp;&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp&nbsp&nbsp;&nbsp &nbsp&nbsp; </td><td> <asp:Label ID="Label4" runat="server" Text="Label"></asp:Label></td>
<td></asp:Label><asp:Label ID="Label5" runat="server" Text="UserName:" CssClass="link3" ></asp:Label>  <asp:LoginName ID="LoginName1" runat="server" /> &nbsp;&nbsp;&nbsp<asp:HyperLink ID="HyperLink15" NavigateUrl="~/myaccount.aspx" Font-Bold="True" Font-Underline="True" runat="server"  ForeColor="Yellow" />&nbsp;&nbsp;&nbsp
    <asp:LoginStatus ID="LoginStatus1" runat="server" />
    </td>
<td></td>
</tr>
  </table>
   <br />
<table align="center">
       <tr>
           <td>
              
                    <asp:CreateUserWizard ID="CreateUserWizard1" CssClass ="border" 
                     runat="server" ContinueDestinationPageUrl ="~/Customer/Customer.aspx" OnContinueButtonClick ="btnOk_Click" >
                    
                    <WizardSteps>
                       
                        <asp:CreateUserWizardStep ID="CreateUserWizardStep1" runat="server">
                        </asp:CreateUserWizardStep>                       
                        <asp:CompleteWizardStep ID="CompleteWizardStep1" runat="server">
                        </asp:CompleteWizardStep>
                    </WizardSteps>
                </asp:CreateUserWizard>
             </td>
         </tr>
         </table>
         
	     <asp:SqlDataSource ID="srcAdd"  runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            InsertCommand="INSERT INTO Customer(CustomerUserName) VALUES (@username)" >
            <InsertParameters >
                <asp:Parameter Name ="username"   Type="String" />
                <%--<asp:Parameter Name ="title" Type ="String" />
                <asp:Parameter Name ="fname" Type="String" />
                <asp:Parameter Name ="lname" Type ="String" />
                <asp:Parameter Name ="address" Type="String"  />
                <asp:Parameter Name ="suburb" Type="String"  />
                <asp:Parameter Name ="postcode" Type="Int32"   />
                <asp:Parameter Name ="dayphone" Type="String" />--%>
            </InsertParameters> 
            </asp:SqlDataSource>
        
    

 
 <br /> <br /><br />
  
   
  <table width="100" cellpadding="15" ><tr><td>Copyright@2012 MovieTix</td><td><asp:HyperLink ID="HyperLink8"  CssClass="footer" NavigateUrl="~/Default.aspx" runat="server">Homepage</asp:HyperLink></td><td><asp:HyperLink ID="HyperLink9"  CssClass="footer" NavigateUrl="~/Session.aspx" runat="server">Session</asp:HyperLink></td><td><asp:HyperLink ID="HyperLink10"  CssClass="footer" NavigateUrl="~/Movie.aspx" runat="server">Movies</asp:HyperLink></td><td><asp:HyperLink ID="HyperLink12"  CssClass="footer" NavigateUrl="~/register.aspx" runat="server">Register</asp:HyperLink></td><td><asp:HyperLink ID="HyperLink13"  CssClass="footer" NavigateUrl="~/Login.aspx" runat="server">Log In</asp:HyperLink></td></tr></table>
  </div>
    </form>
</body>
</html>
